function T = createNormalizationMatrix(x,y)

centroid = mean([x y]);
X = x-centroid(1);
Y = y-centroid(2);

XY = [X Y]';
normal = sqrt(XY(1,:).^2+XY(2,:).^2);
scale = sqrt(2)/mean(normal);

T = [scale 0 -centroid(1)*scale;0 scale -centroid(2)*scale;0 0 1];
